package de.baumann.browser.model

import de.baumann.browser.api.net.AppConfigService
import de.baumann.browser.api.net.base.ApiBuilder
import de.baumann.browser.api.net.vo.Actives
import de.baumann.browser.api.net.vo.Result
import de.baumann.browser.rx.RxSchedulers
import io.reactivex.Observable

class AppConfigModel {
    var appConfigService: AppConfigService = ApiBuilder.buildService(AppConfigService::class.java)
    fun getActiveConfig(): Observable<Result<Actives>> {
        return appConfigService.getActiveConfig().compose(RxSchedulers.ioMain())
    }

    fun getAirDropTime(): Observable<Result<String>> {
        return appConfigService.getAirDropTime().compose(RxSchedulers.ioMain())
    }

}